package com.example.springhibernate.dto;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * Company
 *
 * @author zhouxianfeng
 * @date 2021-4-13
 */
@Data
public class Company {
    private String name;

    @Valid
    @NotNull(message = "{company.person.notnull}")
    @Size(min = 1, message = "{company.person.min}")
    private List<Person> person;
}
